def aas(rak):
    a = []
    c = ["(", "[", "{"]
    v = [")", "]", "}"]
    z = {")": "(", "]": "[", "}": "{"}
    for ba in rak:
        if ba in c:
            a.append(ba)
        elif ba in v:
            if not a:
                return "False"
            if a[-1] == z[ba]:
                a.pop()
            else:
                return "False"
    if not a:
        return "True"

